package fr.umlv.m2.jee.spij.service.tutorial;

import fr.umlv.m2.jee.spij.service.ldap.authentification.DisplayActor;
import org.springframework.binding.message.MessageContext;

import java.util.List;

/**
 * @author thomas magny
 */
public interface IDisplayTutorialService {

    /**
     * @param unitId
     *
     * @return
     */
    public List<DisplayTutorial> getAllDisplayTutorial(final long unitId, MessageContext context);

    /**
     * Returns all the Tutorials given for an user.
     *
     * @param unitId the unit foreign key
     *
     * @return a list of DTO that contains the displayed data
     */
    public List<DisplayTutorial> getAllDisplayTutorialPerUser(final long unitId, DisplayActor currentUser, MessageContext context);

    /**
     * @param id
     *
     * @return
     */
    public DisplayTutorial getTutorialById(final long id, MessageContext context);

    /**
     * @param tutorial
     * @param unitId
     * @param context
     *
     * @return
     */
    public boolean createTutorial(final DisplayTutorial tutorial, final long unitId, final MessageContext context);

    /**
     * @param id
     *
     * @return
     */
    public boolean deleteTutorialById(final long id);

    /**
     * @param id
     * @param modifiedTutorial
     * @param context
     *
     * @return
     */
    public boolean updateTutorialById(DisplayTutorial modifiedTutorial, MessageContext context);
}
